<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=9" />
		<meta http-equiv="pragma" content="no-cache" />
		<title>查看民意征集的评论</title>
		<%@ include file="../../../common/Admin-list.jsp"%> 		
		<script type="text/javascript" src="<%=bpath %>Scripts/jquery/jquery.form.js"></script> 			 
		<script type="text/javascript">					
		$(function(){
			if('${data.solicitPublicComment.typeId}'!=null && '${data.solicitPublicComment.typeId}'==1){				
				if('${data.solicitPublicComment.is_publish}'=="0"){
					$("#is_publish").attr("checked",false);
				}				
			}
						
			//保存 -- 是否对外公开
			$("#lnbSave").click(function(){		
				$("#addForm").ajaxSubmit({
					url:"../solicitPublicCommentController/update.json",
					type:"POST",
					beforeSubmit:checkForm,
					contentType:"application/x-www-form-urlencoded;charset=UTF-8",
					error:function(){},
					success:function(data){
						if(data.success==true){
							showTip("保存成功，返回列表页面！","succeed");								
						}else{
							art.dialog.alert('保存失败，请确认填写正确！');
						}
					},
				});
			});
			
			
		});
			
		function checkForm(){
			var flag=$('#addForm').form('validate');
			return true;
		}
				
		//消息提示  
		function showTip(mess,icon) {  
		    art.dialog({  
		        id : 'Tip',  
		        title : '消息',  
		        fixed : true,  
		        lock : true,  
		        opacity: .2,  
		        content : mess,  
		        icon : icon,  
		        time : 1  
		    });  
		    setTimeout('originReload()', 1000);  
		}  
		
		//重载来源页面  
		function originReload(){  
		    var win = art.dialog.open.origin;		    
		   // win.location.reload();  
		   top.art.dialog({id:"testComment"}).close();		   
		   win.reloadComments(); //刷新评论
		}
		
		</script>
		
</head>
<body>
<!---->
<div>
	<div id="tab">
        <ul>
            <li class="Current">
            	<a href="#" onfocus="this.blur()">
            		<span id="lblTitle" >民意征集-评论查看 </span>
            	</a>
            </li>
        </ul>
    </div>  
    <div id="menu">
        <ul>
            <li>
            	<a id="lnbSave">
            		<span><img src="<%=basePath %>pages/Admin/Images/Icon/save.gif" alt="Save" />保存</span>
            	</a>
            </li>
        </ul>
    </div>
    
    <div id="middle"> 
    	<!-- 咨询详情 -->
    	<div class="mailinfo" style="width:98%;">
      		<div class="mailbt">
      			民意征集-评论详情
      		</div>
      		<form action="../solicitPublicCommentController/update.json" id="addForm" name="addForm" method="post" >  
      		<table width="100%" cellspacing="1" cellpadding="0" border="0" bgcolor="#CCCCCC" align="center">
       		<tbody>
       		     <tr>
                    <td width="15%" class="tdRight">日期：</td>
                    <td width="82%">
                    	                    	
                    	<fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss"  value="${data.solicitPublicComment.createTime}"  type="both" />	
                    	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    	<label class="tdRight">IP：</label>${data.solicitPublicComment.ip}
                    </td>
                </tr>     
                <tr>
                	<td class="tdRight">是否公开：</td>
                    <td>
                    	<input id="is_publish" type="checkbox" name="is_publish" checked="checked" value="1"/>                	
                    	<input id="id" name="id" type="hidden" value="${data.solicitPublicComment.id}" ></input>                    					
                    </td>
                </tr>                                 
                <tr>
                    <td class="tdRight" valign="top">内容：</td>
                    <td>${data.solicitPublicComment.contents}</td>
                </tr>                                                    
      		</tbody>
      		</table>     
      		</form>
    	</div>
         
    </div>
</div>
</body>
</html>